﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Services.System
{
    public class PrincipalHotlineDto : ModelBase
    {
        public Guid? Id { get; set; }
        /// <summary>
        /// 幼儿id
        /// </summary>
        public Guid ChildId { get; set; }

        /// <summary>
        /// 幼儿名字
        /// </summary>
        public string? ChildName { get; set; }

        /// <summary>
        /// 幼儿头像
        /// </summary>
        public Guid? ChildImgId { get; set; }

        /// <summary>
        /// 班级
        /// </summary>
        public Guid ClassId { get; set; }

        /// <summary>
        /// 班级名字
        /// </summary>
        public string? ClassName { get; set; }

        /// <summary>
        /// 家长id
        /// </summary>
        public Guid ParentId { get; set; }

        /// <summary>
        /// 家长名字
        /// </summary>
        public string? ParentName { get; set; }

        /// <summary>
        /// 家属关系
        /// </summary>
        public int? Relationship { get; set; }

        /// <summary>
        /// 关系Str
        /// </summary>
        public string RelationshipStr { get { return EnumHelper.GetDescriptionContent((EnumParentRelationship)Relationship.Value); } }

        /// <summary>
        /// 是否回复
        /// </summary>
        public bool IsReply { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string? Content { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 内容图片
        /// </summary>
        public List<PrincipalHotlineImage>? Images { get; set; } = null;

        public List<PrincipalHotlineReply>? ReplyList { get; set; } = null;

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<PrincipalHotline, PrincipalHotlineDto>();

            profile.CreateMap<PrincipalHotlineDto, PrincipalHotline>();

        }
    }
}
